package com.example.demo.Controller;

import com.example.demo.dao.RoleReposity;
import com.example.demo.domain.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RoleController {

    @Autowired
    RoleReposity roleReposity;

    @RequestMapping("/saverole")
    public Role save(String name){

        Role r = roleReposity.save(new Role(name));

        return r;

    }
}
